package com.example.test.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.client.RestTemplate;


@Configuration
@Import({ConfigA.class,ConfigB.class,MySelector.class,MyImportBeanDefinitionRegistrar.class})
public class Config {
    @Autowired
    private RestTemplateBuilder restTemplateBuilder;

    public Config(RestTemplateBuilder restTemplateBuilder) {
        this.restTemplateBuilder = restTemplateBuilder;
    }

    @Bean("restTemplate")
    public RestTemplate getRestTemplate() {
        return restTemplateBuilder.build();
    }
}
